<!DOCTYPE html>
<html>
	<head>
	    <meta charset="utf-8">
	    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
	    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
	    <title>Hello APP</title>
	    <link rel="stylesheet" type="text/css" href="../../css/index.css" />
	</head>
	<style type="text/css">
		.warp{width: 100%;}
		.title-img{width: 100%;}
		.title-img img{width: 100%;display: block;}
		.tuijian-box .shop-list .shop-one .shop-info .price-box .price{font-size: 15px;color: #FF9502;padding-right: 0;box-sizing: border-box;font-weight: bold;flex-shrink: 0;line-height: 16px;}
		.tuijian-box .shop-list .shop-one .shop-info .price-box .code{font-size: 15px;line-height: 16px;color: #FF9502;font-weight: bold;flex-shrink: 0;}
	</style>
	<body>
		<div id="vue" class="warp">

			<!--标题图片-->
			<div class="title-img">
				<img v-if="img" :src="img"/>
			</div>

			<!--全部商品-->
			<div class="tuijian-box" style="display:none;" :style="{ display:(Pdata ? '':'none')}">
				<div class="shop-list flex">
					<div class="shop-one" v-for="(item,key) in Pdata.listData" :data-id="item.sid" :data-type="item.htype" tapmode onclick="open_goods(this);">
					 	<div class="img-box bgpic" :style="{backgroundImage:'url('+item.image+')'}"></div>
						<div class="shop-info">
					 		<div class="name han_2" v-text="item.title"></div>
							<div class="price-box flex">
	                            <div class="price" v-text="'¥'+item.price"></div>
								<div class="code">+<i v-text="item.unscore"></i>积分</div>
	                            <div class="num-box flex1" v-text="'已售'+item.buy_nums"></div>
					 		</div>
					 	</div>
					</div>
				</div>
		    </div>

			<!--占位图-->
			<div class="nodata" style="display:none;" :style="{ display:(noData ? '':'none')}">
	            <img src="../../image/no_page/no_shop.png" />
	            <p>暂无商品</p>
	        </div>
			<!-- 底部 -->
	        <div class="bottom-box" :style="{ display:(loadingMsg ? '':'none')}">
	            <div class="msgbox" v-html="loadingMsg" style="color:#999;"></div>
	        </div>

		</div>
	</body>
</html>
<script type="text/javascript" src="../../script/base.min.js" id="loadjs" data-js="L/swiper.min,L/lazyload,L/h-tool"></script>
<script type="text/javascript">
	define(function (require, exports, module) {
		pageParam = api.pageParam;
		_page.getData = function(loading) {
			lanYun.getVueData({url:'ScoreGoods/index',get:{page:lanYun.page},cache:0,loading:loading},function(ret) {
				//console.log(JSON.stringify(ret))
			});
		};
		lanYun.newVue('#vue',{
			img:pageParam.img
		},function() {
			_page.getData(1);
		});
		//滚动加载..
		new auiScroll({distance:200, listen:true},function(ret) {
			if($(window).scrollTop() < 2) ret.isToBottom = false;
			var d = ret.scrollTop / 208;
			if(!ret.isToBottom) return;
			_page.getData(0);
		});

		//打开商品详情
		open_goods = function (tis) {
			var dst = tis.dataset;
			lanYun.openWin('goods/show', {
				win:'none',
				frameParam : dst,
			});
		}
	});
</script>
